<template>
	<el-dialog title="" visible :show-close="false" :modal-append-to-body="false" class="wrap">
		<i class="el-icon-close close" @click="cancel" style="color: white;z-index:10;"></i>
		<div class="bt">详情</div>
		<el-form label-width="100px" class="form">
			<div  v-for='v in comboxlist'  :class="v.classname" style="text-align: left;width: 60%;margin: 0 auto;" > 
				<span style="color: black; font-size: 14px;">{{v.title}}</span>
				<span :class="v.style" >{{v.val}}</span>
			</div>
			<!--<textarea v-model="cjtz" style="width: 80%;height:100px;margin: 0 auto;">{{cjtz}}</textarea>-->
		</el-form>
		<el-button type="primary" class="submit" @click="cancel">确定</el-button>
		<!--<el-button type="danger" class="submit" @click="cancel">取消</el-button>-->

	</el-dialog>
</template>
<script type="text/javascript">
	import qs from 'qs'
	export default {
		props: ['params'],
		data() {
			return {
				comboxlist:[],
				cjtz:[],
				form: {
					id: '',
					lx: '',
				},
			}
		},
		created() {
			this.form.id = this.params.row.sid;
			this.form.lx = this.params.row.lx;
			this.loadinfo();
		},
//		computed: {
//			newCjtz: function() {
//				//对str进行操作
//				return '前部分' + '<br/>' + '后部分'
//			}
//		},
		methods: {
			loadinfo() {
				var logininfo = JSON.parse(localStorage.logininfo);
				var params2 = qs.stringify({
					sid: this.form.id,
					lx: this.form.lx,
					yhid: logininfo.id,
					xxid: logininfo.xxid
				})
				//执行
				this.axios.post(this.$store.state.api + 'jccx/xq', params2)
					.then(res => {
						this.comboxlist = res.data.data.list;
						console.log(this.comboxlist,'ddddd')
						if(this.comboxlist[3].title=='退回经手人:'){
							this.comboxlist[3]=false;
						}
					}).catch(res => {
						this.$message.warning("服务器异常");
						this.$emit('close', { type: 'lxxq', cancel: true });
					})
			},
			cancel() {
				this.$emit('close', { type: 'lxxq', cancel: true })
			}
		}
	}
</script>

<style lang="less" scoped>
    .class1{
    	color: black;
    }
    .class2{
    	color: red;
    }
    .class3{
    	color:#196108;
    }
    .class4{
    	color: yellow;
    }
    .class5{
    	color: blue;
    }
	.wrap {
		text-align: center;
	}
	
	.bt {
		position: absolute;
		width: 100%;
		height: 50px;
		margin: 0 auto;
		top: 0;
		left: 0;
		background: #50BFFF;
		color: white;
		text-align: left;
		line-height: 50px;
		font-size: 17px;
		padding-left: 15px;
	}
	
	.form {
		text-align: center;
		font-size: 20px;
		margin-bottom: 20px;
		margin-top: 10px;
		color: red;
	}
	
	.input {
		width: 300px;
		display: inline-block;
	}
	
	.select-block {
		display: block;
	}
	
	.submit {
		width: 120px;
	}
</style>